<%--
  Created by IntelliJ IDEA.
  User: 柳胜酉
  Date: 2023/4/21
  Time: 19:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>商品库存列表</title>
    <link href="${pageContext.request.contextPath}/statics/style/css/Site.css" rel="stylesheet" type="text/css"/>
    <link href="${pageContext.request.contextPath}/statics/style/css/zy.layout.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/statics/style/css/zy.form.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/statics/style/css/index.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/statics/style/css/zy.menu.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/statics/style/css/zy.all.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/statics/style/css/amazeui.min.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/statics/style/css/admin.css" rel="stylesheet"/>
</head>
<script src="${pageContext.request.contextPath}/statics/scripts/jquery-3.6.1.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/statics/scripts/Jqueryplugs.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/statics/scripts/_layout.js" type="text/javascript"></script>

<body style="overflow: scroll;background: #F8F8F8">
<div style="position: absolute; left: 180px; right: 10px;">
    <div class="dvcontent">
        <div>
            <div class="tabs">
                <div class="hd">
                    <ul>
                        <li class="on" style="box-sizing: initial;-webkit-box-sizing: initial;">商品列表</li>
                        <li class="on" style="box-sizing: initial;-webkit-box-sizing: initial;">
                            <a href="${pageContext.request.contextPath}/admin/admin_product_add">
                                新增商品</a>
                        </li>
                    </ul>
                </div>
                <div class="bd">
                    <ul style="display: block;padding: 20px;">
                        <li>
                            <!--分页显示角色信息 start-->
                            <div id="dv1">
                                <table class="table" id="tbRecord">
                                    <thead>
                                    <tr>
                                        <th>商品编号</th>
                                        <th>商品名</th>
                                        <th>商品原库存</th>
                                        <th>供应商编号</th>
                                        <th>供应商名</th>
                                        <th>更新库存</th>
                                        <th>更新</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach items="${list}" var="item">
                                        <form action="${pageContext.request.contextPath}/doUpdateInventory?id=${item.product_id}" method="post">
                                            <tr>
                                                <td>${item.product_id}</td>
                                                <td>${item.product_name}</td>
                                                <td>${item.product_inventory}</td>
                                                <td>${item.supplier_id}</td>
                                                <td>${item.supplier_name}</td>
                                                <td><label>
                                                    <input type="text" name="product_inventory" id="product_inventory"
                                                           value="${item.product_inventory}">
                                                </label></td>
                                                <td>
                                                    <input type="submit" value="修改"
                                                           onclick="return confirm('确认修改？');">
                                                </td>
                                            </tr>
                                        </form>
                                    </c:forEach>
                                    </tbody>
                                </table>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
